package com.example.bootuserservice.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.bootuserservice.mapper.UserMapper;

import org.example.pojo.User;
import org.example.service.PayService;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
@com.alibaba.dubbo.config.annotation.Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Reference
    PayService payService;

    @Override
    public User getUserById(Integer userId) {
        return userMapper.getUserById(userId);
    }

    @Override
    public BigDecimal getAccountByUserId(Integer userId) {
        return payService.getAccount(userId);
    }

}
